package org.dreamwork.tools.simulator.connector.data.schema;

import org.dreamwork.persistence.DatabaseSchema;

public class RequestLogSchema extends DatabaseSchema {
    public RequestLogSchema () {
        tableName = "request_log";
        fields = new String[] {"id", "if_id", "uri", "method", "body", "client", "request_time"};
    }

    @Override
    public String getCreateDDL () {
        return "CREATE TABLE request_log (" +
                "   id              TEXT            NOT NULL PRIMARY KEY," +
                "   if_id           TEXT," +
                "   uri             TEXT," +
                "   method          TEXT," +
                "   body            TEXT," +
                "   client          TEXT," +
                "   request_time    TIMESTAMP" +
                ")";
    }

    @Override
    public String getPrimaryKeyName () {
        return "id";
    }
}
